<template>
  <SearchSelectPicker
    v-model="id"
    url="/call-center/api/v1/questionnaire/page"
    lable-name="title"
    value-name="id"
    custom-name="title"
    v-bind="$attrs"
    :value.sync="id"
    :params="{query:{questionnaireSort:{value:1,operator:'='}},type:0}"
  ></SearchSelectPicker>
</template>

<script>
import SearchSelectPicker from '@/components/SearchSelectPicker'
export default {
  name: 'QuestionnaireSelect',
  components: {
    SearchSelectPicker
  },
  props: {
    value: undefined
  },
  data() {
    return {
      id: ''
    }
  },
  watch: {
    id: {
      handler(n) {
        this.$emit('input', n)
      }
    },
    value: {
      handler(n) {
        this.$set(this, 'id', n)
      },
      immediate: true
    }
  }
}
</script>
